/*
* $Id: ViewTable.h 87 2010-05-13 21:43:03Z volok-aleksej@yandex.ru $
*
* Copyright 2009 by Volokitin Alexey
* All rights reserved
*
*/
#ifndef _VIEW_TABLE_H_
#define _VIEW_TABLE_H_

#include "../ViewJournal.h"
#include "TableRegion.h"

class CViewTable : public CEmptyViewJournal
{
	CButton m_buttonAdd;
	CButton m_buttonDelete;
	CButton m_buttonChange;
protected:
	CTableRegion m_tableRegion;
protected:
	virtual void PaintView(CDC* dc, CRect rect);
	virtual void ResizeTableRegion(CRect rect);
	void UpgradeScroll(CRect rect);
	void UpdateButtons();
protected:
	DECLARE_MESSAGE_MAP();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnDestroy();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnPaint();
	afx_msg void OnTimer(UINT_PTR);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg BOOL OnSetCursor(CWnd*, UINT, UINT);
	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
public: 
	CViewTable(CState* pState);
	virtual ~CViewTable();
};

#endif/*_VIEW_TABLE_H_*/